<include file="public/layout" />
<style>
    .system_img_location{text-align: center; width: 120px;position:absolute;top:15px; margin-left:265px;}
</style>
<body style="background-color: #FFF; overflow: auto;">
<div id="append_parent"></div>
<div id="ajaxwaitid"></div>
<div class="page">
    <div class="fixed-bar">
        <div class="item-title">
            <div class="subject">
                <h3>美体师简介</h3>
                <h5>美体师信息设置</h5>
            </div>
            <ul class="tab-base nc-row">
                
            </ul>
        </div>
    </div>
    <!-- 操作说明 -->
    <div class="explanation" id="explanation">
        <div class="title" id="checkZoom"><i class="fa fa-lightbulb-o"></i>
            <h4 title="提示相关设置操作时应注意的要点">操作提示</h4>
            <span id="explanationZoom" title="收起提示"></span> </div>
        <ul>
            <li>美体师的头像比率是1:1哦</li>
        </ul>
    </div>
    <div id="ajaxwaitid"></div>
    <form method="post" id="handlepost" action="{:U('Storeb/addeditb')}" name="form1">
        <input type="hidden" name="form_submit" value="ok" />
        <input id="beautician_id" name="beautician_id" value="{$info.beautician_id}" type="hidden" />
        <div class="ncap-form-default">
            <dl class="row">
                <dt class="tit">
                    <label for="record_no">美体师名称</label>
                </dt>
                <dd class="opt">
                    <input id="name" name="name" value="{$info.name}" class="input-txt" type="text" />
                    <p class="notic">显示在前台的美体师名称</p>
                </dd>
            </dl>
            <dl class="row">
                <dt class="tit">
                    <label for="store_name">年限</label>
                </dt>
                <dd class="opt">
                    <input id="exp" name="exp" value="{$info.exp}" class="input-txt" type="text" />
                    <p class="notic">美体师工作年限 单位（年）</p>
                </dd>
            </dl>
            
            <dl class="row">
                <dt class="tit">
                    <label for="store_name">介绍</label>
                </dt>
                <dd class="opt">
                    <textarea rows="5" cols="80" name="message" class="input-txt" style="height: 80px;">{$info.message}</textarea>
                    <p class="notic">美体师的类型</p>
                </dd>
            </dl>
            
            <dl class="row">
                <dt class="tit">
                    <label for="store_name">擅长项目</label>
                </dt>
                <dd class="opt">
                    <textarea rows="5" cols="80" name="workmsg" class="input-txt" style="height: 80px;">{$info.workmsg}</textarea>
                    <p class="notic">美体师擅长项目</p>
                </dd>
            </dl>
            
            <dl class="row">
                <dt class="tit">
                    <label for="store_name">联系方式</label>
                </dt>
                <dd class="opt">
                    <input id="phone" name="phone" value="{$info.phone}" class="input-txt" type="text" />
                    <p class="notic">美体师预约电话</p>
                </dd>
            </dl>
            
            <dl class="row">
                <dt class="tit">
                    <label><em></em>好评率</label>
                </dt>
	            <dd class="opt">	            	
	                <select id="level" name="level">	     
	                	<option value="1" <if condition="$info.level eq 1">selected</if>>1星</option>
	                	<option value="2" <if condition="$info.level eq 2">selected</if>>2星</option>
	                	<option value="3" <if condition="$info.level eq 3">selected</if>>3星</option>
	                	<option value="4" <if condition="$info.level eq 4">selected</if>>4星</option>
	                	<option value="5" <if condition="$info.level eq 5">selected</if>>5星</option>
	                </select>
	                <p class="notic">五星好评哦</p>
	            </dd>
            </dl>
            
			 <dl class="row">
                <dt class="tit">
                    <label><em></em>职位</label>
                </dt>
	            <dd class="opt">	            	
	                <select id="role" name="role">	     
	                	<volist name="rtpinfo" id="item">
	                       <option value="{$item.id}" <if condition="$info.role eq $item.id">selected</if>>{$item.rolename}</option>
	               		</volist>             
	                </select>
	                <p class="notic">美体师的职位</p>
	            </dd>
            </dl>

            <dl class="row">
                <dt class="tit">
                    <label for="store_logo">美体师图片</label>
                </dt>
                <dd class="opt">
                    <div class="input-file-show">
                        <span class="show">
                            <a id="icon_a" target="_blank" class="nyroModal" rel="gal">
                                <i id="icon_i" class="fa fa-picture-o" onmouseover="layer.tips('<img src='+localUrl+'{$info.icon}>',this,{tips: [1, '#fff']});" onmouseout="layer.closeAll();"></i>
                            </a>
                        </span>
           	            <span class="type-file-box">
                            <input type="text" id="icon" name="icon" value="{$info.icon}" class="type-file-text">
                            <input type="button" name="button" id="button1" value="选择上传..." class="type-file-button">
                            <input class="type-file-file" onClick="GetUploadify(1,'icon','beautician','img_call_back')" size="30" hidefocus="true" nc_type="change_site_logo" title="点击前方预览图可查看大图，点击按钮选择文件并提交表单后上传生效">
                        </span>
                    </div>

                    <span class="err"></span>
                    <p class="notic">图片的宽高比为1:1哦</p>
                </dd>
            </dl>
            
            <div class="bot">
                <a href="JavaScript:void(0);" class="ncap-btn-big ncap-btn-green" onclick="storesave()">确认提交</a>
            </div>
        </div>
    </form>
</div>
<div id="goTop"> <a href="JavaScript:void(0);" id="btntop"><i class="fa fa-angle-up"></i></a><a href="JavaScript:void(0);" id="btnbottom"><i class="fa fa-angle-down"></i></a></div>
</body>
<script type="text/javascript">
	
	function storesave(){
        $('span.err').hide();
        $.ajax({
            type: "POST",
            url: "{:U('Storeb/addeditb')}",
            data: $('#handlepost').serialize(),
            async:false,
            dataType: "json",
            error: function () {
                layer.alert("服务器繁忙, 请联系管理员!");
            },
            success: function (data) {
                if (data.status == 1) {
                	console.log('v.data.url='+data.data.url);
                    layer.msg(data.msg, {
                        icon: 1,
                        time: 2000,
                    },function(){
                            location.href = data.data.url;
                        });
                } else {
                    layer.msg(data.msg, {icon: 2,time: 3000});
                }
            }
        });
    }
	
    //网站图标
    function img_call_back(fileurl_tmp , elementid)
    {
      	console.log('fileurl_tmp='+fileurl_tmp);
        var shourl = localUrl + fileurl_tmp;
        $("#"+elementid).val(fileurl_tmp);
        $("#"+elementid+'_a').attr('href', shourl);
        $("#"+elementid+'_i').attr('onmouseover', "layer.tips('<img src="+shourl+">',this,{tips: [1, '#fff']});");
    }
   
</script>
</html>